import rRequest from "@/assets/axios/request.js";

export default {
    generateKey() {
        return new Promise((resolve, reject) => {
            rRequest.GET({
                url: "/card/generate/key"
            }).then(res => {
                resolve(res);
            }).catch(e => {
                reject(e);
            })
        })
    },
    generateCard(payload) {
        return new Promise((resolve, reject) => {
            rRequest.POST({
                url: "/card/generate",
                data: payload
            }).then(res => {
                resolve(res);
            }).catch(e => {
                reject(e);
            })
        })
    }
}
